# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-ordpy
pkgver=1.1.5
pkgrel=0
pkgdesc="A Python package for data analysis with permutation entropy and ordinal network methods"
url="https://github.com/arthurpessa/ordpy"
arch="noarch"
license="MIT"
depends="python3 py3-numpy"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://github.com/arthurpessa/ordpy/archive/v$pkgver/ordpy-$pkgver.tar.gz"
builddir="$srcdir/ordpy-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

# no tests provided by the upstream; use smoke tests
check() {
	PYTHONPATH=build/lib python3 -c "import ordpy"
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl

	install -Dm644 README.rst -t "$pkgdir"/usr/share/doc/$pkgname
	install -Dm644 CITATION.cff -t "$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
fc02faef7425422de4838566ddf7716f243ee48e1f5cee8e714917f3bcdbfb90b9c36cc39ffd60c35997d04956941946ce16666791804288af61f2ca9ff5905e  ordpy-1.1.5.tar.gz
"
